﻿<UserControl x:Class="DomusDotNet.Sbm.Client.WP7.Views.BookListView"
			 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
			 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
			 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
			 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
			 xmlns:cal="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro"
			 mc:Ignorable="d"
			 d:DesignHeight="480"
			 d:DesignWidth="480">

	<Grid>
		<Grid.RowDefinitions>
			<RowDefinition Height="auto" />
			<RowDefinition Height="*" />
			<RowDefinition Height="auto" />
		</Grid.RowDefinitions>
		<Border Name="BusyState_IsSet">
			<StackPanel HorizontalAlignment="Stretch">
				<TextBlock HorizontalAlignment="Left"
						   Name="BusyState_Message"></TextBlock>
				<ProgressBar IsIndeterminate="True" />
			</StackPanel>
		</Border>

		<ItemsControl ItemsSource="{Binding Books}"
					  Grid.Row="1">
			<ItemsControl.ItemTemplate>
				<DataTemplate>
					<Button cal:View.Model="{Binding}"
							cal:View.Context="ListItem"
							cal:Message.Attach="Share($dataContext)"
							HorizontalContentAlignment="Left"
							VerticalContentAlignment="Top" />
				</DataTemplate>
			</ItemsControl.ItemTemplate>
		</ItemsControl>

		<Button Name="ChooseNumber" Grid.Row="2" Margin="5"
				Content="Choose a contact"></Button>
	</Grid>
</UserControl>
